import 'package:json_annotation/json_annotation.dart';

part 'assessment_question_record.body.g.dart';

@JsonSerializable()
class QuestionRecordBody {
  final String assessmentId;
  final String questionGroupId;
  final String userName;
  final String progressStatus;
  final List<Map> record;

  QuestionRecordBody(
      {required this.assessmentId,
      required this.questionGroupId,
      required this.userName,
      required this.progressStatus,
      required this.record});

  factory QuestionRecordBody.fromJson(Map<String, dynamic> json) =>
      _$QuestionRecordBodyFromJson(json);
  Map<String, dynamic> toJson() => _$QuestionRecordBodyToJson(this);
}

@JsonSerializable()
class QuestionRecordBodyNew {
  final String userName;
  final String kind;
  final String type;
  final String textType;
  final String audioType;
  final String mode;
  final String? bookCode;
  final List<Map> record;

  QuestionRecordBodyNew(
      {required this.bookCode,
      required this.kind,
      required this.type,
      required this.textType,
      required this.audioType,
      required this.mode,
      required this.userName,
      required this.record});

  factory QuestionRecordBodyNew.fromJson(Map<String, dynamic> json) =>
      _$QuestionRecordBodyNewFromJson(json);
  Map<String, dynamic> toJson() => _$QuestionRecordBodyNewToJson(this);
}

@JsonSerializable()
class QuestionSingleStep {
  final List<String>? answer;
  final int? number;
  final String? questionId;

  QuestionSingleStep(
      {required this.answer, required this.number, required this.questionId});

  factory QuestionSingleStep.fromJson(Map<String, dynamic> json) =>
      _$QuestionSingleStepFromJson(json);
  Map<String, dynamic> toJson() => _$QuestionSingleStepToJson(this);
}
